package com.ashin.controller;

import com.ashin.bean.User;
import com.ashin.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Ashin
 * @Date: 2021/5/14
 * @Description: com.ashin.controller
 * @Version: 1.0.0
 */
@RestController
public class HelloController {

    @Autowired
    private UserDao userDao;

    @RequestMapping("/")
    public List<User> home() {
        List<User> users = userDao.queryAll();
        return users;
    }
}
